﻿using Abp.Authorization;
using RMM.FrameWork;
using RMM.ShopAppService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace RMM.Web.Controllers
{
    public class ShopController : RMMControllerBase
    {
        private readonly IShopAppService _shopAppService;

        public ShopController(IShopAppService shopAppService)
        {
            _shopAppService = shopAppService;
        }

        public async Task<JsonResult> GetShopByIdAsync(long? id)
        {
            if (CommonHelper.Check(id))
            {
                return Json("参数错误");
            }
            var shop = await _shopAppService.GetShopByIdAsync(id.Value);
            return Success(shop);
        }
    }
}